package object;

public class Point {
	private int x;
	private boolean xSet = false;
	private int y;
	private boolean ySet = false;
	public Point(int x, int y){
		this.x = x;
		this.y = y;
		xSet = true;
		ySet = true;
	}
	public int getX() {
		if(xSet==false)
			throw new NullPointerException("X has not been set");
		return x;
	}
	public void setX(int x) {
		this.x = x;
	}
	public int getY() {
		if(ySet==false)
			throw new NullPointerException("Y has not been set");
		return y;
	}
	public void setY(int y) {
		this.y = y;
	}
}
